3.1609 \(\int \frac{1}{a+\frac{b}{x}} \, dx\)

Optimal. Leaf size=18 \[ \frac{x}{a}-\frac{b \log (a x+b)}{a^2} \]

[Out]

x/a - (b*Log[b + a*x])/a^2

_______________________________________________________________________________________

Rubi [A]  time = 0.0309238, antiderivative size = 18, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 9, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.222 \[ \frac{x}{a}-\frac{b \log (a x+b)}{a^2} \]

Antiderivative was successfully verified.

[In]  Int[(a + b/x)^(-1),x]

[Out]

x/a - (b*Log[b + a*x])/a^2

_______________________________________________________________________________________

Rubi in Sympy [F]  time = 0., size = 0, normalized size = 0. \[ \int \frac{1}{a}\, dx - \frac{b \log{\left (a x + b \right )}}{a^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  rubi_integrate(1/(a+b/x),x)

[Out]

Integral(1/a, x) - b*log(a*x + b)/a**2

_______________________________________________________________________________________

Mathematica [A]  time = 0.00440873, size = 18, normalized size = 1. \[ \frac{x}{a}-\frac{b \log (a x+b)}{a^2} \]

Antiderivative was successfully verified.

[In]  Integrate[(a + b/x)^(-1),x]

[Out]

x/a - (b*Log[b + a*x])/a^2

_______________________________________________________________________________________

Maple [A]  time = 0.003, size = 19, normalized size = 1.1 \[{\frac{x}{a}}-{\frac{b\ln \left ( ax+b \right ) }{{a}^{2}}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  int(1/(a+b/x),x)

[Out]

x/a-b*ln(a*x+b)/a^2

_______________________________________________________________________________________

Maxima [A]  time = 1.44092, size = 24, normalized size = 1.33 \[ \frac{x}{a} - \frac{b \log \left (a x + b\right )}{a^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(1/(a + b/x),x, algorithm="maxima")

[Out]

x/a - b*log(a*x + b)/a^2

_______________________________________________________________________________________

Fricas [A]  time = 0.218557, size = 23, normalized size = 1.28 \[ \frac{a x - b \log \left (a x + b\right )}{a^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(1/(a + b/x),x, algorithm="fricas")

[Out]

(a*x - b*log(a*x + b))/a^2

_______________________________________________________________________________________

Sympy [A]  time = 1.04563, size = 14, normalized size = 0.78 \[ \frac{x}{a} - \frac{b \log{\left (a x + b \right )}}{a^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(1/(a+b/x),x)

[Out]

x/a - b*log(a*x + b)/a**2

_______________________________________________________________________________________

GIAC/XCAS [A]  time = 0.225533, size = 26, normalized size = 1.44 \[ \frac{x}{a} - \frac{b{\rm ln}\left ({\left | a x + b \right |}\right )}{a^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(1/(a + b/x),x, algorithm="giac")

[Out]

x/a - b*ln(abs(a*x + b))/a^2